Encryption device, decryption device, and data reproduction device

ABSTRACT

An encrypting apparatus  100  is composed of: a file reading unit  101  which obtains a file made up of a data section (mdat) including at least one of encoded image data, audio data, text data and a header section (moov) including a header of the data section; a data encrypting unit  106  which encrypts at least one of the sets of data included in the data section of the file; a header analyzing unit  102  which analyzes the header section of the file and obtains a value of a field (EINFO) that is included in the header section to show an encoding method used for data to be encrypted by the data encrypting unit  106;  a header converting unit  104  which converts the obtained value according to a predetermined conversion rule and replaces the value in the field with the converted value; and a file outputting unit  105  which outputs a file made up of a header section (moov′) including a field (EINFO′) in which the value has been replaced and a data section (encrypted mdat) including the encrypted data.

TECHNICAL FIELD

The present invention relates to a decrypting apparatus and anencrypting apparatus which respectively decrypt and encrypt encryptedand unencrypted data files stored in a data server or a memory and thenmove the respective data files to another data server or memory. It alsorelates to a data reproducing apparatus which inputs encrypted andunencrypted data files to decode and reproduce them. In general, theexpression of decoding is used as a concept opposed to encryption. Notethat, however, the expression of decoding is used as a concept opposedto encoding in the present specification. For this reason, anexplanation will be given using the expression of decryption as aconcept opposed to encryption.

BACKGROUND ART

As the international standard for multiplexing digital data such asvideo, audio, and text data, there are file formats standardized by, forexample, the ISO/MPEG (International Organization Standardization/MovingPicture Experts Group) and the 3GPP (The Third Generation PartnershipProject) which is a group defining the international standard of thethird generation mobile W-CDMA communication (ISO/IEC14496-12, ISO/IEC14496-14, and 3GPP TS26.234, for example).

FIG. 1 shows an example of a file structure defined by the above-statedstandard.

As shown in FIG. 1, a file 900 is composed of a header section (“moov”)901 and a data section (“mdat”) 902.

The header section 901 includes track boxes (“trak”) 903, the number ofwhich is equal to or more than the number of media of multiplexeddigital data. Each track box 903 includes one sample descriptioninformation storage box (“stsd”) 904. The sample description informationstorage box 904 includes at least one entry (“entry”) 905. The entry 905is, in turn, composed of an entry size (ENT_SZ) 906, an entryinformation (EINFO) 907, and other fields. The entry information 907includes an entry type (ENT_TP) 908 and a reservation field (RSV_(—)6)909.

The entry size 906 is a field for designating the size of the entry 905by the number of bytes.

The entry type 908 is a field for indicating a method of encodingdigital data. For example, in the entry type 908 according to theabove-stated standard: 0x6D703476 (mp4v) will be described in the caseof the MPEG4 video encoding method; 0x6D703461 (mp4a) will be describedin the case of the MPEG4 audio encoding method; 0x73323633 (s263) willbe described in the case of the ITU-T H.263 video encoding method;0x73616D72 (samr) will be described in the case of the AMR audioencoding method; and 0x74783367 (tx3g) will be described in the case ofthe time text encoding method.

The reservation field 909 is a field which is reserved as an extendedarea for the future, and is provided in preparation for standardrevision or the like.

The data section 902 stores multiplexed digital data, such as image,audio, and text data. Here, access information of each set of data isgiven in the track box 903 as an offset value measured in bytes from thebeginning of the file 900. For example, suppose that the accessinformation of a certain set of image data is designated as 12,450 bytesin the track box 903. In this case, the corresponding image data isstored in a position located 12,450 bytes measured from the beginning ofthe file 900.

Incidentally, transmission of high-quality moving picture data hasbecome possible owing to the widespread use of broadband networks inrecent years. On account of this, transmission services for movingpicture data are provided on a chargeable basis. For a case of providinga transmission service for moving picture data with superioraudio-visual value, data encryption is essential in view of protectionof the right of intangible property such as a copyright. Suggestions arenow made for the ISO/MPEG, etc. to establish a standard of a file formatfor storing encrypted data.

FIG. 2 shows a part of a data structure in a conventional encryptionfile format currently suggested for the ISO/MPEG. It should be notedthat the data structure of this conventional encryption file format isdisclosed in Japanese Laid-Open Patent Application No. 2002-304805, forexample.

As shown in FIG. 2, the suggestion is made for the conventionalencryption file format so that a data structure referred to as anencrypted information box (“einf”) 911 is added to the entry 910.According to this format, 0x656E6376 (encv) is described in commoninstead of mp4v, s263, etc. which are described in the conventionalentry type 908 by the video encoding method, and 0x656E6361 (enca) isdescribed in common instead of mp4a, samr, etc. which are described inthe conventional entry type 908 by the audio encoding method.

After encryption, the entry type 908 is summarized as encv, enca, etc.However, mp4v, samr, etc. described in the original entry type 908, thatis, the entry type 908 before encryption, will be described in a dataformat field 915 of an original format box (“frma”) 912 in the “einf”911.

Accordingly, an encoding method can be determined by reference to thisdata format field 915. Also, it becomes possible to determine thepresence or absence of encryption by reference to the entry type 908 inwhich specific encv, enca, or the like is described. In a case whereencryption has been performed, information indicating the encryptingmethod is required. As to this, the information is described using ascheme type field 916 and a scheme version field 917 of a scheme box(“schm”) 913 included in the “einf” 911. By reference to these fields,the encoding method and its version can be determined. In addition tothis, the “einf” 911 includes a scheme information box 914 which has ascheme specifying data field 918.

FIG. 3 is a diagram for explaining a difference in the header section ofa file in a case where a certain unencrypted file is encrypted using theabove-stated encryption file format.

In FIG. 3, the “stsd” 904 before encryption (i.e., unencrypted stsd) andan “stsd” 920 after encryption (i.e., encrypted stsd) are shown. Theunencrypted entry size 906 is indicated as 0x000000F3 (the decimalnumber 243), that is, 243 bytes. The unencrypted entry type 908 isindicated as 0x6D703476 (mp4v). Meanwhile, the encrypted entry size 906is indicated as 0x0000011B (the decimal number 283), that is, 283 bytes.The encrypted entry type 908 is indicated as 0x656E6376 (encv).Moreover, an “einf” 911 is added to the encrypted “stsd” 920 and0x65696E66 (einf) is described in a box type (BOX_TP) field 921 of the“einf” 911. Furthermore, 0x6D703476 (mp4v) described in the unencryptedentry type 908 is duplicated into the data format field 915 of the“frma” 912 included in the “einf” 911.

Using the stated conventional file format, however, the data size of theheader section is changed before and after encryption. For this reason,all sets of the access information of the digital data have to beupdated, and this causes various problems.

A more specific explanation is given as follows. When an unencryptedfile is encrypted, the “einf” 911 is added. As shown in FIG. 4, adifference is caused in size between the header section 901 and theheader section 931, before and after encryption. On this account, thefile size is different between the file 900, i.e., the file beforeencryption, and the file 930, i.e., the file after encryption.

Thus, the encrypting apparatus and the decrypting apparatus need toperform processing for re-generating a header section in addition toperforming the encryption and decryption processing. This leads to aproblem that the processing loads of the encrypting apparatus anddecrypting apparatus will be increased.

As has been mentioned, the access information of each set of data isgiven in the field included in the track box 903, as an offset valuemeasured from the beginning of the file. However, as to an encryptedfile, the size of the header section 931 preceding the data section 932is increased, so that the starting position of the data section 932 isshifted.

For this reason, when converting the unencrypted file 900 into theencrypted file 930 or converting the encrypted file 930 into theunencrypted file 900, the encrypting apparatus and decrypting apparatuswill have a problem of updating all the sets of the access informationof the data. In addition, this update of the access information of thedata includes updating tracks which are not objects of the encryptionand decryption processing even when only a part of a track is selectedand the encryption and decryption processing is performed on it.

Particularly if an optical disc, such as a DVD, is used as a medium forrecording files (a DVD recorder, for example), another problem is causedthat a recording position of digital data on the optical disk has to bechanged because the file size is changed due to the encryption ordecryption of the file.

Moreover, if file size information is managed for each file according tothe standard of a memory card, it would also be necessary to update themanagement information due to the change in the file size.

The present invention is conceived in view of these problems, and it isan object of the present invention to provide an encrypting apparatuswhich can encrypt unencrypted data without changing the file size. It isanother object of the present invention to provide a decryptingapparatus which can decrypt encrypted data without changing the filesize.

DISCLOSURE OF THE INVENTION

To achieve the above-stated objects, an encrypting apparatus of thepresent invention for encrypting at least one of encoded image data,audio data, and text data is made up of: a file reading unit operable toobtain a file which has a data section including the encoded image data,audio data, and text data and a header section including a header of thedata section; an encrypting unit operable to encrypt at least one of theencoded image data, audio data, and text data included in the datasection of the file; a header analyzing unit operable to analyze theheader section of the file and to obtain a value described in a fieldthat is included in the header section to show an encoding method usedfor data to be encrypted by the encrypting unit; a header convertingunit operable to convert the obtained value according to a predeterminedconversion rule and to replace the value described in the field with theconverted value; and a file outputting unit operable to output a filehaving a header section including a field in which the value has beenreplaced and a data section including the encrypted data. With thisstructure, when the encoded data is to be encrypted, the value describedin the field that is included in the header of the file to indicate theencoding method is replaced according to the predetermined rule. Onaccount of this, the encoding method employed before encryption and thepresence/absence of encryption can be specified in the header of thefile, with the size of the header of the file not being changed.Moreover, it is unnecessary to re-generate the header section or tochange the recording position of data. Therefore, the apparatus requiresless processing load.

Here, it is preferable that the header converting unit is operable toconvert the obtained value through a bit inversion. Moreover, it ispreferable that the header converting unit is operable to change a bitposition in the obtained value at which the bit inversion is to beperformed, according to an encrypting method used by the encryptingunit. Also, it is preferable that the header converting unit is operableto change a bit inversion formula to be used for the bit inversion,according to an encrypting method used by the encrypting unit. With thisstructure, the position at which the bit inversion is performed or thebit inversion formula can be changed depending on the encrypting method.Thus, it becomes possible to specify the encrypting method, the versionnumber of the encrypting method, etc. in the header of the file, withthe file size not being changed.

A decrypting apparatus of the present invention for decrypting encrypteddata, the encrypted data being at least one of encoded image data, audiodata, and text data, is made up of: a file reading unit operable toobtain a file which has a data section including the encoded image data,audio data, and text data and a header section including a header of thedata section; a header analyzing unit operable to analyze the headersection of the file and to obtain a value described in a field that isincluded in the header section to show an encoding method used for theencrypted data and information regarding encryption; a header convertingunit operable to convert the obtained value according to a predeterminedconversion rule and to replace the value described in the field with theconverted value; a decrypting unit operable to decrypt the encrypteddata out of the encoded image data, audio data, and the text dataincluded in the data section of the file; and a file outputting unitoperable to output a file having a header section including a field inwhich the value has been replaced and a data section including thedecrypted data. With this structure, the value described in the fieldthat is included in the header of the file to indicate the encodingmethod and the information regarding encryption is rewritten into thefield indicating the encoding method, according to the predeterminedrule. On account of this, the encrypted data can be decrypted, with thefile size not being changed.

It should be noted that the present invention can be realized not onlyas such an encrypting apparatus and a decrypting apparatus, but also asa data reproducing apparatus which decodes encoded data throughdecryption so as to reproduce it. Moreover, the present invention can berealized as an encrypting method, a decrypting method, and a datareproducing method which respectively include steps corresponding to thecharacteristic units provided for such an encrypting apparatus, adecrypting apparatus and a data reproducing apparatus. Furthermore, thepresent invention can be realized as a program which causes a computerto execute these steps. It should be understood that this program can bedistributed via a recording medium such as a CD-ROM or a transmissionmedium such as the Internet.

As described so far, using the encrypting apparatus of the presentinvention, the encoding method employed before encryption, thepresence/absence of encryption, the encrypting method, and the versionnumber of the encrypting method are specified by replacing the value ofthe field that is included in the header of the file to indicate theencoding method according to the predetermined rule. On account of this,unencrypted data can be encrypted, with the file size not being changed.Moreover, recording position of data, such as image, audio, and textdata, measured from the beginning of the file is not changed. Thus, itis unnecessary to update the access information of the data.Furthermore, since only a part of the header section needs to bereplaced, the processing load of the header section can be substantiallyreduced as compared with a case of an encrypting apparatus operatingaccording to the conventional file format standard. Moreover, arecording position of data does not need to be changed even in a casewhere a file on an optical disk is to be encrypted. Thus, variouseffects can be expected. For example, it would be unnecessary to updatethe management information holding the file size information that ispossibly required according to the standard of a memory card.

Also, using the decrypting apparatus of the present invention, the valueof the field that is included in the header of the file to indicate theencoding method and information regarding encryption is replacedaccording to the predetermined rule. The file size is not changed beforeand after the decryption of the encrypted data, so that the processingload of the header section can be substantially reduced.

Moreover, using the data reproducing apparatus of the present invention,even if an encrypted file is inputted, the encryption determining unitcan determine the presence/absence of encryption and the encoding methodby reference to one data field. For the header analysis processing, theconventional method can be used to convert the conventional file formatbefore encryption into a compatible format. Thus, as an effect, a datareproducing apparatus can be provided at a low cost in comparison withthe conventional apparatus.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an example of a conventional file structure defined by thestandard.

FIG. 2 shows a part of a data structure in a conventional encryptionfile format.

FIG. 3 is a diagram for explaining a difference in a header section of afile in a case where an unencrypted file is encrypted in theconventional encryption file format.

FIG. 4 is a diagram for explaining a difference in file size betweenbefore and after encryption.

FIG. 5 is a block diagram showing a functional structure of anencrypting apparatus of a first embodiment of the present invention.

FIG. 6A is a diagram showing a first example of a conversion table.

FIG. 6B is a diagram showing a second example of the conversion table.

FIG. 6C is a diagram showing a third example of the conversion table.

FIG. 7 is a flowchart showing a first example of a processing operationperformed by a header converting unit of the encrypting apparatus.

FIG. 8 is a diagram showing a comparison of a file before encryption anda file after encryption processing performed by the encrypting apparatus100.

FIG. 9 is a diagram showing a comparison of a file before encryption anda file after a second encryption processing performed by the encryptingapparatus 100.

FIG. 10 shows an example of a bit inversion table.

FIG. 11 is a flowchart showing a second example of the processingoperation performed by the header converting unit of the encryptingapparatus.

FIG. 12 is a diagram showing a comparison of an entry type before bitinversion and an entry type after bit inversion.

FIG. 13 is a block diagram showing a functional structure of adecrypting apparatus of a second embodiment.

FIG. 14 is a flowchart showing a first example of a processing operationperformed by a header converting unit of the decrypting apparatus

FIG. 15 is a flowchart showing a second example of the processingoperation performed by the header converting unit of the decryptingapparatus.

FIG. 16 is a block diagram showing a functional structure of a datareproducing apparatus of a third embodiment of the present invention.

FIG. 17 is a flowchart showing a processing operation performed by anencryption determining unit of the data reproducing apparatus.

FIG. 18 shows an application example of the encrypting apparatus, thedecrypting apparatus, and the data reproducing apparatus of the presentinvention.

BEST MODE FOR CARRYING OUT THE INVENTION

An encrypting apparatus, a decrypting apparatus, and a data reproducingapparatus of the present invention operate based on a data format inwhich the presence/absence of encryption and an encoding method requiredto decrypt an encrypted file can be determined, while keeping the headersize and the file size unchanged between encryption and decryption ofdata section according to the ISO/MPEG file format (MP4 file format).

The following is a description of embodiments of the present invention,with reference to the drawings. It should be note that an explanationwill be given mainly using image data as data which is to be encryptedor decrypted in the embodiments. However, this has no intention ofexcluding encryption and decryption of other kinds of media data, suchas audio data and text data.

First Embodiment

First, an encrypting apparatus of the first embodiment of the presentinvention is explained, with reference to FIG. 5 to FIG. 12.

FIG. 5 is a block diagram showing a functional structure of theencrypting apparatus of the first embodiment.

As shown in FIG. 5, an encrypting apparatus 100 is composed of a filereading unit 101, a header analyzing unit 102, a data structure holdingunit 103, a header converting unit 104, a file outputting unit 105, anda data encrypting unit 106.

The file reading unit 101 is a processing unit for inputting a filewhich is not encrypted (i.e., an unencrypted file) that stores data,such as image, audio, and text data, according to an MP4 file format.The file reading unit 101 reads an unencrypted file following aninstruction from the header analyzing unit 102, and then outputs aheader section (“moov”) of the file to the header analyzing unit 102.

The header analyzing unit 102 is a processing unit for analyzing the“moov”, and outputs an EINFO of each entry included in the “moov” to theheader converting unit 104 as well as outputting access information(data access information) of data, such as image, audio, and text data,stored in the unencrypted file to the data structure holding unit 103.Moreover, the header analyzing unit 102 obtains an EINFO′, which can beobtained by converting the EINFO, from the header converting unit 104.Then, the header analyzing unit 102 generates a “moov′” that includesthe EINFO′, and outputs it to the file outputting unit 105.

The data structure holding unit 103 is a memory, such as a DRAM or anSDRAM, for holding the data access information indicating respectivestorage locations of data, such as image, audio, and text data, with thelocations being measured from the beginning of the file.

The header converting unit 104 is a processing unit for converting anEINFO into an EINFO′ so as to determine the presence or absence ofencryption and the encoding method. The header converting unit 104 isprovided with a conversion table to reference to when performing aconversion, and obtains an EINFO from the header analyzing unit 102.Then, after converting the EINFO into the EINFO′ in accordance with theconversion table, the header converting unit 104 outputs the EINFO′ tothe header analyzing unit 102.

The data encrypting unit 106 is a processing unit for performing dataencryption, and obtains a data section (“mdat”) of the file from thefile reading unit 101. The data encrypting unit 106 encrypts the datausing the data access information held by the data structure holdingunit 103, and outputs the data section obtained after encryption (i.e.,an encrypted mdat) to the file outputting unit 105.

The file outputting unit 105 is a processing unit for obtaining the“moov′” from the header analyzing unit 102 as well as obtaining theencrypted mdat from the data encrypting unit 106. After integratingthese, the file outputting unit 105 outputs the encrypted file.

Here, an explanation is given as to the conversion table provided forthe header converting unit 104, with reference to a plurality ofexamples shown in FIG. 6.

FIG. 6A is a first example of the conversion table.

In FIG. 6A, a conversion table A 104 a is shown on the left side while aconversion table B 104 b is shown on the right side. Here, theconversion table A 104 a and the conversion table B 104 b are associatedwith each other by the numbers shown in #. If a value 0x6D703476(“mp4v”) is described in the entry type included in an EINFO of anunencrypted file, this means that this value is to be converted into avalue 0x65703476 (“ep4v”). To be more specific, FIG. 6A shows astructure where every first character of the entry type included in anEINFO of an unencrypted file is converted into 0x65 (“e”).

It should be noted that, as another structure shown in FIG. 6B, alowercase alphabetic character m of the first character of the entrytype may be converted into an uppercase alphabetic character M. Withthis structure, values of the entry type such as mp4v, mp4a, s263, andsamr before encryption would be respectively converted into Mp4v, Mp4a,S263, and Samr through encryption. Moreover, as shown in FIG. 6C, everyfirst character of the entry type may be converted into 0x00. This is tosay, as long as the conversion is performed by the encryption side andthe decryption side according to a uniquely defined rule, any conversionrule can be employed. For example, instead of a first character, anarbitrary character may be converted, or two or more characters may beconverted. Alternatively, a conversion rule by which the sequence ofcharacters is changed may be employed.

Next, an explanation is given as to an example of a specific operationperformed by the header converting unit 104. Note that, in the presentexample, the header converting unit 104 uses the conversion table shownin FIG. 6A and mp4v is described in the entry type.

FIG. 7 is a flowchart showing a first example of a processing operationperformed by the header converting unit 104.

First, the header converting unit 104 inputs an EINFO outputted from theheader analyzing unit 102 (S102).

Next, the header converting unit 104 reads out an entry type (ENT_TP)included in the EINFO (S104), and judges whether the first byte ENT_TP[0] of the ENT_TP is 0x65 (which represents e based on the ASCII)(S106).

If it is judged to be 0x65 (Yes at S106), this means that image datarelated to this track has been already encrypted and the value of theEINFO does not need to be changed. Thus, processing from step S108 tostep S112 can be omitted. It should be noted that whether or not thefirst byte of the ENT_TP is 0x65 is what determines the presence orabsence of encryption in the present embodiment.

Meanwhile, if it is judged not to be 0x65 (No at S106), the headerconverting unit 104 searches for the value described in the ENT_TPthrough the conversion table B 104 b (S108). As shown in FIG. 6A, theconversion table B 104 b has at least four candidates, from 0 to 3. Bythe ASCII representation: the entry of #0 is mp4v; the entry of #1 ismp4a; the entry of #2 is s263; and the entry of #3 is samr. These arespecified values indicating the encoding methods defined by the standardof the ISO/MPEG and 3GPP.

On the basis of the search result obtained in step S108, the headerconverting unit 104 judges whether a matching value has been detected(S110). Here, since the value of the ENT_TP is mp4v, the headerconverting unit 104 judges that the value matches with the entry of #0in the conversion table B 104 b (Yes at S110). Note that if no matchingvalue has been detected (No at S110), the header converting unit 104holds the value described in the ENT_TP as it is and proceeds to stepS114.

After this, the header converting unit 104 replaces the value of theENT_TP with the value 0x65703476 (“ep4v”) of the same #0 in theconversion table A 104 a (S112).

Finally, the header converting unit 104 outputs the EINFO′ in which thevalue of the ENT_TP has been converted as described so far to the headeranalyzing unit 102 and then ends the processing operation (S114).

FIG. 8 is a diagram showing a comparison of a file before encryption toa file after encryption which is performed by the encrypting apparatus100.

FIG. 8 shows a sample description information storage box (“stsd”) 113included in a “moov” 111 of a file 110 before encryption (i.e., anunencrypted file) and an “stsd” 123 included in a “moov” 121 of a file120 after encryption (i.e., an encrypted file). This diagram also showsthat a value (6D) of a first byte of an unencrypted ENT_TP 116 isconverted into a value (e) of a first byte of an encrypted ENT_TP 126.

In this way, by converting the value of the unencrypted ENT_TP 116 whichis a field for describing an encoding method when data is to beencrypted, the ENT_TP 126 of the encrypted file 120 can be used as afield for indicating the encoding method and the presence or absence ofencryption.

Moreover, as shown in the present diagram, a value of an entry size(ENT_SZ) 115 is not changed between the unencrypted file 110 and theencrypted file 120. This means that the size is not changed between the“moov” 111 and the “moov” 121 even after the encryption processing. Thatis to say, the file sizes of the file 110 and the file 120 are the same.

Note that the explanation described so far has been given on theassumption that the encrypting method to be used for encrypting data isfixed. However, even in a case where the encrypting method is variable,the encrypting apparatus 100 can set the encrypting method and itsversion number using the header converting unit 104. In this case, theencrypting method and its version number can be described using thereservation field (RSV_(—)6) of the above-stated file format.

A more specific explanation is given. The reservation field has sixbytes with values of 0. As such, after replacing the ENT_TP with thevalue found in the conversion table A 104 a at the step S112 of theflowchart shown in FIG. 7, the header converting unit 104 uses fourbytes to set a scheme type field (SC_TYPE) indicating an encryptingmethod and uses two bytes to set a scheme version field (SC_VER)indicating a version number of the encrypting method, for example. Then,the header converting unit 104 describes the values of a pre-givenencrypting method and its version number into the fields, and outputsthe EINFO′ to the header analyzing unit 102.

FIG. 9 is a diagram showing a comparison of a file before encryption toa file after a second encryption processing which is performed by theencrypting apparatus 100.

FIG. 9 shows that a reservation field 136 included in an “stsd” 133 ofan unencrypted file 130 is converted into a scheme type field (SC_TYPE)146 and a scheme version field (SC_VER) 147 of an “stsd” 143 in anencrypted file 140.

As is the case with FIG. 8, a value of an ENT_SZ 134 is not changedbetween the unencrypted file 130 and the encrypted file 140.

In this way, the encrypting apparatus 100 can generate the encryptedfile showing the information such as the encrypting method and itsversion number without changing the file size by using the reservationfield.

Incidentally, the reservation field is provided as an extended area forthe future and its available byte size is limited to six bytes. As such,the encrypting apparatus 100 may use another method to convert the EINFOso that the encrypting method, the presence or absence of encryption,the encrypting method, its version number, etc. will be indicated. Inthe present embodiment, bit inversion is explained as another method.

For using the bit inversion, the header converting unit 104 holds a bitinversion table in which a plurality of bit inversion formulas arerecorded. The header converting unit 104 selects a bit inversion formulapredetermined corresponding to an encoding method or encrypting method,and then converts a value of an ENT_TP of an EINFO according to theselected formula.

FIG. 10 shows an example of a bit inversion table.

As shown in FIG. 10, a bit inversion table 104 g records a different bitinversion formula for each encoding method and encrypting method intable form. This diagram shows that if the encoding method described inthe ENT_TP is mp4v and data is to be encrypted using an encryptingmethod 1, the bit inversion is performed on mp4v using a bit inversionformula ˆA to covert the value of the ENT_TP.

It should be noted that the present diagram does not show the versionnumbers of the encrypting methods. In a case where the version number ofthe encrypting method is to be considered, the encrypting method 1 canbe provided for each version number and a different bit formula can beassigned for each, for example.

FIG. 11 is a flowchart showing a second example of the processingoperation performed by the header converting unit 104 of the encryptingapparatus 100. Note that mp4v is described in the ENT_TP and data is tobe encrypted according to the encrypting method 1 in the present exampleas is the case with the above example.

First, the header converting unit 104 inputs an EINFO outputted from theheader analyzing unit 102 (S202).

Next, the header converting unit 104 reads out an ENT_TP included in theEINFO (S204).

Following this, the header converting unit 104 searches for the valuedescribed in the ENT_TP indicating the encoding method through the bitinversion table 104 g (S206) and then judges whether a matching valuehas been detected (S208). Here, since the value of the ENT_TP is mp4v,the header converting unit 104 judges that the matching value is in thebit inversion table 104 g (Yes at S208). Note that if judging that nomatching value is in the table (No at S208), the header converting unit104 holds the value described in the ENT_TP as it is and proceeds tostep S214.

Then, the header converting unit 104 performs the bit inversion on thevalue of the ENT_TP according to the bit inversion formula set in thebit inversion table 104 g (S210). In the present example, since the datais supposed to be encrypted according to the encrypting method 1, theheader converting unit 104 performs the bit inversion on the value ofthe ENT_TP using the bit inversion formula ˆA shown in the bit inversiontable 104 g.

After this, the header converting unit 104 replaces the value of theENT_TP with the value obtained through the bit inversion (S212).Finally, the header converting unit 104 outputs the EINFO′ in which thevalue of the ENT_TP has been converted to the header analyzing unit 102and then ends the processing operation (S214).

FIG. 12 is a diagram showing a comparison of an entry type before bitinversion to an entry type after bit inversion.

FIG. 12 shows that a value 0110 is described in a first four-bit 151 ofan unencrypted ENT_TP 150 and that a value 0110 is described in a lastfour-bit 152 as well. This is because mp4v would be 0x6D703476 as ahexadecimal number by the ASCII representation and the value 6 which isa value of each of the first four bits and the last four bits isrepresented as 0110 by binary numbers.

Moreover, the present diagram shows that the bit inversion is performedon the first four-bit 151 according to ˆ1111 (ˆf) and a value 1001 isdescribed into a first four-bit 161 of an encrypted ENT_TP 160. Thepresent diagram also shows that the bit inversion is performed on thelast four-bit 152 according to ˆ1010 (ˆa) and a value 1100 is describedinto a last four-bit 162 of the encrypted ENT_TP 160.

Here, the first four-bit 151 and the last four-bit 152 are set so thatthe bit inversion formulas are changeable respectively according to theencrypting method and the version number of the encrypting method. Bydoing so, the 151 can indicate that the encrypting method is variablewhile the 152 can indicate the version number of the encrypting method.

In order to achieve this, a bit position of the ENT_TP at which the bitinversion is performed is set for each encrypting method and eachversion number, and a plurality of bit inversion formulas are providedas well. With this, as compared with the stated case where thereservation field is used, more detailed encryption information can beprovided without changing the file size between before and afterencryption.

In this way, the encrypting apparatus of the first embodiment canspecify the encoding method employed before encryption, the presence orabsence of encryption, the encrypting method, the version number of theencrypting method, etc. in the header of the file without changing thefile size, by replacing the value of the field included in the header ofthe file to indicate the encoding method or by performing the bitinversion on the value.

It has been impossible for the conventional MP4 file format of theISO/MPEG to specify both the presence/absence of encryption and theencoding method in one data field. However, it becomes possible usingthe encrypting apparatus of the first embodiment.

Moreover, since the storage positions of data, such as image, audio, andtext data, measured from the beginning of the file are not changed, theaccess information of each set of data does not need to be updated. Asto the header of the file, only four-byte part (ENT_TP) of the EINFO hasto be rewritten. Thus, as compared to an encrypting apparatus thatoperates according to the conventional file format standard, theprocessing load of the header can be substantially reduced.

Furthermore, since the file size is not changed, a recording position ofdata does not need to be changed even in a case where a file on anoptical disk is to be encrypted like when using a DVD recorder or thelike. Thus, various effects can be expected. For example, it would beunnecessary to update the management information holding the file sizeinformation that is possibly required depending on the standard of thememory card.

Second Embodiment

Next, a decrypting apparatus of the second embodiment of the presentinvention is explained, with reference to FIG. 13 to FIG. 15.

The decrypting apparatus of the second embodiment inputs an encryptedfile based on the file format explained in the above first embodimentand outputs a decrypted file. The decrypting apparatus has many parts incommon with the encrypting apparatus described in the above firstembodiment. Therefore, an explanation will be given mainly regarding thedifferent parts.

FIG. 13 is a block diagram showing a functional structure of thedecrypting apparatus of the second embodiment.

As shown in FIG. 13, a decrypting apparatus 200 is composed of a filereading unit 201, a header analyzing unit 202, a data structure holdingunit 203, a header converting unit 204, a file outputting unit 205, anda data decrypting unit 206.

The file reading unit 201 is a processing unit for inputting a file (anencrypted file) generated by the encrypting apparatus 100 of the abovefirst embodiment. Following an instruction from the header analyzingunit 202, the file reading unit 201 reads an encrypted file and outputsa header section (“moov′”) of the file to the header analyzing unit 202.

The header analyzing unit 202 is a processing unit for analyzing the“moov′”, and outputs an EINFO′ of each entry included in the “moov” tothe header converting unit 204 as well as outputting access informationof data, such as image, audio, and text data, stored in the encryptedfile to the data structure holding unit 203. Moreover, the headeranalyzing unit 202 obtains an EINFO, which can be obtained by convertingthe EINFO′, from the header converting unit 204. Then, the headeranalyzing unit 202 generates a “moov” that includes the EINFO andoutputs it to the file outputting unit 205. Furthermore, from the headerconverting unti 204, the header analyzing unit 202 obtains encryptioninformation, including the presence or absence of encryption, anencrypting method, the version number of the encrypting method, etc.,that is required to decrypt the encrypted data. The header analyzingunit 202 then outputs the information to the data decrypting unit 206.

The data structure holding unit 203 is a memory, such as a DRAM or anSDRAM, for holding the data access information.

The header converting unit 204 is a processing unit for determining thepresence or absence of encryption and the encoding method and forconverting an EINFO′ into an EINFO. The header converting unit 204 isprovided with a conversion table to reference to when performing aconversion. After obtaining the EINFO′ from the header analyzing unit202 and converting it into the EINFO in accordance with the conversiontable, the header converting unit 204 outputs the EINFO to the headeranalyzing unit 202.

The data decrypting unit 206 is a processing unit for unscramblingencryption of data (i.e., performing decryption). The data decryptingunit 206 obtains an encrypted mdat from the file reading unit 201 anddecrypts the data using the encryption information outputted from theheader analyzing unit 202 and the data access information held by thedata structure holding unit 203. Then, the data decrypting unit 206outputs the data section (mdat) obtained through the decryption to thefile outputting unit 205.

The file outputting unit 205 is a processing unit for obtaining the“moov” from the header analyzing unit 202 as well as obtaining the mdatfrom the data decrypting unit 206. After integrating these, the fileoutputting unit 205 outputs the decrypted file, that is, the unencryptedfile.

Next, an explanation is given as to an example of a specific operationperformed by the header converting unit 204. Note that, as in the casewith the above first embodiment, the conversion table shown in FIG. 6Ais used and ep4v is described in the entry type in the present example.

FIG. 14 is a flowchart showing a first example of a processing operationperformed by the header converting unit 204.

First, the header converting unit 204 obtains an EINFO′ outputted fromthe header analyzing unit 202 (S302).

Next, the header converting unit 204 reads out an ENT_TP included in theEINFO′ (S304), and judges whether the first byte ENT_TP [0] of theENT_TP is 0x65 (S306).

If it is judged not to be 0x65 (No at S306), this means that image datarelated to this track has been already decrypted or the image data isunencrypted. As such, the value of EINFO′ does not need to be changedand processing from step S308 to step S312 can be omitted. It should benoted that whether or not the first byte of the ENT_TP is 0x65 is whatdetermines the presence or absence of encryption in the secondembodiment.

Meanwhile, if it is judged to be 0x65 (Yes at S306), the headerconverting unit 204 searches for the value described in the ENT_TPthrough the conversion table A 104 a (S308). As shown in FIG. 6A, theconversion table A 104 a has at least four candidates, from 0 to 3. Bythe ASCII representation: the entry of #0 is ep4v; the entry of #1 isep4a; the entry of #2 is e263; and the entry of #3 is eamr. These areobtained by converting a first byte of a specified value indicating theencoding method defined by the standard of the ISO/MPEG and 3GPP into0x65 (representing e in the ASCII representation).

On the basis of the search result obtained in step S308, the headerconverting unit 204 judges whether a matching value has been detected(S310). Here, since the value of the ENT_TP is ep4v, the headerconverting unit 204 judges that the value matches with the entry of #0in the conversion table A 104 a (Yes at S310). Note that if no matchingvalue has been detected (No at S310), the header converting unit 204holds the value described in the ENT_TP as it is and proceeds to stepS314.

After this, the header converting unit 204 replaces the value of theENT_TP with the value 0x6D703476 (“mp4v”) of the same #0 in theconversion table B 104 b (S312).

Finally, the header converting unit 204 outputs the EINFO in which thevalue of the ENT_TP has been converted as described so far to the headeranalyzing unit 202 and then ends the processing operation (S314).

It should be noted that in a case where the encrypting method and itsversion number are described using the reservation field as explained inthe above-stated embodiment, the header converting unit 204 replaces theENT_TP with the value found in the conversion table B 104 b, sets thevalues of the SC_TYPE and SC_VER fields to 0, and outputs the EINFO tothe header analyzing unit 202. This is because the SC_TYPE and SC_VERare not to be set in an unencrypted file.

In addiction, in a case of converting the EINFO using the bit inversionso as to indicate the encoding method, the presence/absence ofencryption, the encrypting method, and its version number as explainedin the above-stated embodiment, the header converting unit 204 operatesas follows.

FIG. 15 is a flowchart showing a second example of the processingoperation performed by the header converting unit 204. Note that, as inthe case with the stated example, ep4v is described in the ENT_TP andthe data encryption is performed according to the encrypting method 1 inthe present example.

First, the header converting unit 204 inputs an EINFO′ outputted fromthe header analyzing unit 202 (S402).

Next, the header converting unit 204 reads out an ENT_TP included in theEINFO′ (S404).

Following this, the header converting unit 204 applies the valuedescribed in the ENT_TP indicating the encoding method or encryptingmethod to each bit inversion formula recorded in the bit inversion table104 g and verifies whether the value after the bit re-inversion becomesthe value indicating the encoding method (S406). Then, the headerconverting unit 204 judges whether the values calculated through the bitre-inversion using every bit inversion formula match with the valueindicating the encoding method (S408). Here, since the value of theENT_TP is ep4v and the data encryption is to be performed according tothe encrypting method 1, the header converting unit 204 judges that thevalue obtained through the bit re-inversion according to the bitinversion formula ˆA in the bit inversion table 104 g matches with mp4v(Yes at S408). If judging there is no matching value (No at S408), theheader converting unit 204 holds the value described in the ENT_TP as itis and proceeds to step S414.

Then, the header converting unit 204 performs the bit re-inversion onthe value of the ENT_TP according to the bit inversion formula set inthe bit inversion table 104 g (S410). In the present example, the headerconverting unit 204 performs the bit re-inversion on the value of theENT_TP using the bit inversion formula ˆA in the bit inversion table 104g.

After this, the header converting unit 204 replaces the value of theENT_TP with the value after the bit inversion (mp4v here). Finally, theheader converting unit 204 outputs the EINFO in which the value of theENT_TP has been converted to the header analyzing unit 202 and then endsthe processing operation (S414).

Note that the header converting unit 204 may perform the verificationand judgment as follows at the steps S406 and S408 shown in FIG. 15. Inthis case, the unencrypted ENT_TP is described as a value within a rangethat is capable of the ASCII representation, and the encrypting methodˆA is employed from among the three types defined as the bit inversionformulas: ˆA (=ff0000); ˆA′ (=ffff0000); and ˆA″ (=ffff00ff).

If mp4v (0x6D703476) is described in the unencrypted ENT_TP, ?p4v(0x92703476) will be described in the encrypted ENT_TP as a result ofthe inversion of mp4v according to the bit inversion formula ˆA(=ff000000). Here, note that “?” is a code which cannot be representedby the ASCII representation.

The header converting unit 204 reads out the ENT_TP included in theEINFO′ and verifies by applying “?p4v” (0x92703476) to each of the threetypes of bit inversion formulas. As a result, the value mp4v(0x6D703476) is obtained according to ˆA (=ff000000), m?4v (0x6D8F3476)is obtained according to ˆA′ (=ffff0000), and m?4? (0x6D8F3489) isobtained according to ˆA″ (=ffff00ff).

On the understanding that the unencrypted ENT_TP is described as thevalue within the range that is capable of the ASCII representation, theheader converting unit 204 judges in step S408 that the encryption hasbeen performed according to the encrypting method ˆA. This is becausecodes not describable by the ASCII representation remain as theverification results through ˆA′ and ˆA″ and only the verificationresult obtained through ˆA can be described by the ASCII representation.

In this way, using the decrypting apparatus of the second embodiment,the file size can remain the same before and after decryption and theprocessing load of the header can be reduced as compared with the caseusing the conventional decrypting apparatus as with the above-statedfirst embodiment. Thus, even in a case where a file on an optical diskis to be decrypted, a recording position of data does not need to bechanged and other effects can be expected.

Third Embodiment

Next, a data reproducing apparatus of the third embodiment of thepresent invention is explained, with reference to FIG. 16 and FIG. 17.

This data reproducing apparatus inputs a file based on the file formatexplained in the stated first and second embodiments. If it isencrypted, the data reproducing apparatus decodes the encrypted data andoutputs the data for reproduction.

FIG. 16 is a block diagram showing a functional structure of the datareproducing apparatus of the third embodiment.

As shown in FIG. 16, a data reproducing apparatus 300 is composed of afile reading unit 301, a header analyzing unit 302, a data structureholding unit 303, an encryption determining unit 304, an SW (switch)305, a data decrypting unit 306, a data decoding unit 307, and a datareproducing unit 308. It should be noted that the block diagram of thedata reproducing apparatus 300 shown in the present figure is structuredby adding the SW 305, the data decoding unit 307, and the datareproducing unit 308 to the function block diagram of the decryptingapparatus 200 of the second embodiment shown in FIG. 13 and by replacingthe header converting unit 204 with the encryption determining unit 304.The basic processing operation performed until the completion ofdecryption is similar to the processing operation performed by thedecrypting apparatus 200 of the above second embodiment.

Moreover, regardless of whether a file is encrypted or not, this datareproducing apparatus 300 can decode and reproduce the inputted file. Amore specific explanation is given. If the encryption determining unit304 detects encryption, an S1 and an S2 of the SW 305 are connected.Then, after the data decrypting unit 306 performs decryption, “mdat” isoutputted to the data decoding unit 307. Meanwhile, if the encryptiondetermining unit 304 does not detect encryption, the S1 and an S3 of theSW 305 are connected. This time, “mdat” is outputted directly to thedata decoding unit 307 without using the data decrypting unit 306.

The encryption determining unit 304 is a processing unit for determiningthe presence or absence of encryption, the encoding method, etc. Byobtaining an EINFO or EINFO′ from the header analyzing unit 302, theencryption determining unit 304 judges whether the inputted file is anencrypted file or unencrypted file. If judging it is an encrypted file,the encryption determining unit 304 outputs a connection signal to theSW 305 so that the S1 and the S2 are connected, and also outputs adecryption instruction signal to direct the data decrypting unit 306 toperform decryption. Meanwhile, if judging it is an unencrypted file, theencryption determining unit 304 outputs a connection signal to the SW sothat the S1 and S3 are connected. Note that when outputting thedecryption instruction signal, the encryption determining unit 304outputs the encryption information including the encrypting method tothe data decrypting unit 306 as well.

The SW 305 is a switch for operating according to the connection signalsent from the encryption determining unit 304.

The data decoding unit 307 is a processing unit for decoding encodeddata. The data decoding unit 307 obtains a decrypted mdat, decodes themdat encoded according to a predetermined encoding method, and thenoutputs the decoded data to the data reproducing unit 308.

The data reproducing unit 308 is a processing unit for reproducing thedecoded data and outputting it to a displaying device.

A specific operation performed by the encryption determining unit 304 isshown as a flowchart in FIG. 17. This flowchart is the same as theflowchart in FIG. 14 showing the operation performed by the headerconverting unit 204 of the decrypting apparatus 200, except that stepsS514 and S518 are added in FIG. 17. In step S514, if the data isencrypted, the encryption determining unit 304 outputs the connectionsignal so that the S1 and the S2 of the SW 305 are connected. In stepS518, if the data is unencrypted, the encryption determining unit 304outputs the connection signal so that the S1 and the S3 of the SW 305are connected.

Although not shown in the flowchart of FIG. 17, the encryptiondetermining unit 304 may determine the SC_TYPE indicating the encryptingmethod and the SC_VER indicating the version number of the encryptingmethod which make up the data field adjacent to the ENT_TP and may judgewhether these correspond to the specified encrypting method.

Moreover, the encryption determining unit 304 may perform a processingoperation in which the steps S514 and S518 of the flowchart shown inFIG. 17 are added to the flowchart in FIG. 15 showing the operationperformed by the header converting unit 204 of the decrypting apparatus200. In doing so, the encryption determining unit 304 may decrypt anencrypted file showing the encoding method, the presence/absence ofencryption, the encrypting method, the version number of the encryptingmethod, etc. through the bit inversion and may decode it forreproduction.

APPLICATION EXAMPLE

The following is an explanation of an application example of theencrypting apparatus, the decrypting apparatus, and the data reproducingapparatus of the present invention, with reference to FIG. 18.

FIG. 18 shows an application example of the encrypting apparatus, thedecrypting apparatus, and the data reproducing apparatus of the presentinvention.

The encrypting apparatus, the decrypting apparatus, and the datareproducing apparatus of the present invention can be applied to amobile phone 403, a personal computer 404, and a PDA 405 which receivean MP4 file or the like distributed from a contents server 401 thatprovides contents such as moving picture data, via a communicationnetwork 402 such as the Internet. The mobile phone 403, the personalcomputer 404, and the PDA 405 encrypt the received MP4 file, record itto a recording medium such as a memory card 406 and a DVD-RAM 407, readthe encrypted MP4 file from a recording medium such as a memory card408, and reproduce it.

In this way, the encrypting apparatus, the decrypting apparatus, and thedata reproducing apparatus of the present invention can be respectivelyused as an MP4 file recording apparatus which encrypts and records anMP4 file and as an MP4 file reproducing apparatus which decrypts andreproduces an MP4 file, in an image distribution system.

Accordingly, an explanation has been given as to the encryptingapparatus, the decrypting apparatus, and the data reproducing apparatusof the present invention on the basis of the embodiments. However, thepresent invention is not limited to these embodiments.

For example, in the stated embodiments, the explanation has been given,with attention focused on a track including one set of data. However, aplurality of tracks (each including image, audio, and text data) may bemultiplexed to a file. In this case, the header converting units 104 and204, the encrypting unit 106, and the decrypting units 206 and 306 canindividually operate with respect to each track.

Moreover, in the stated embodiments, the explanation has been givenusing a file in which a header section and a data section areintegrated. However, the header section and the data section may beseparated and may make up respective files.

Furthermore, in the stated embodiments, the explanation has been givenas to a case of a hardware structure as an example. However, a part ofor entire processing may be operated as a software program whichoperates on a platform such as a CPU or DSP. The software program can berecorded to a floppy disk, a CD-ROM, or a memory card so as to becarried around and can be activated on various apparatuses so as tooperate based on the embodiments.

Moreover, in the stated first embodiment, the first byte of the ENT_TPis what determines the presence or absence of encryption. This is merelyone example, and various methods can be considered. However, the methodneeds to be defined in advance by the standard of the encryption fileformat. For example, a byte other than the first byte may be converted,or two or more bytes may be converted. As long as a conversion rulewhich is appropriately considered is standardized, the presence orabsence of encryption can be determined while the information regardingthe encoding method is held in the ENT_TP. In this way, according to thepredetermined rule, it becomes possible to correspond to a new type ofdata, as compared with the conventional file format. The conventionalfile format can correspond only to three types of data, that is, image,audio, and system data defined by the MPEG4 system. However, the method,by which the ENT_TP indicating the encoding method is convertedaccording to the predetermined rule, can easily correspond to a textencoding method defined by the 3GPP (for example, tx3g would beencrypted to ex3g).

Furthermore, although an inputted file is described so as to be based onthe ISO/MPEG4 file format (that is, an MP4 file) in the statedembodiments, it can be applied to other file formats.

INDUSTRIAL APPLICABILITY

The encrypting apparatus, the decrypting apparatus, and the datareproducing apparatus of the present invention are suitable as a mobilephone, a personal computer, and the like provided with a moving picturereproducing function that: obtain an MP4 file storing media data, suchas video data and audio data; encrypt and record the MP4 file to arecording medium; and decrypt and reproduce the MP4 file storing theencrypted media data, such as video data and audio data.

1. An encrypting apparatus for encrypting at least one of encoded imagedata, audio data, and text data, said encrypting apparatus comprising: afile reading unit operable to obtain a file which has a data sectionincluding the encoded image data, audio data, and text data and a headersection including a header of the data section; an encrypting unitoperable to encrypt at least one of the encoded image data, audio data,and text data included in the data section of the file; a headeranalyzing unit operable to analyze the header section of the file and toobtain a value described in a field that is included in the headersection to show an encoding method used for data to be encrypted by saidencrypting unit; a header converting unit operable to convert theobtained value according to a predetermined conversion rule and toreplace the value described in the field with the converted value; and afile outputting unit operable to output a file having a header sectionincluding a field in which the value has been replaced and a datasection including the encrypted data.
 2. The encrypting apparatusaccording to claim 1, wherein said header converting unit is operable toconvert the obtained value through a bit inversion.
 3. The encryptingapparatus according to claim 2, wherein said header converting unit isoperable to change a bit position in the obtained value at which the bitinversion is to be performed, according to an encrypting method used bysaid encrypting unit.
 4. The encrypting apparatus according to claim 2,wherein said header converting unit is operable to change a bitinversion formula to be used for the bit inversion, according to anencrypting method used by said encrypting unit.
 5. The encryptingapparatus according to claim 1, wherein the conversion rule isrepresented by a conversion table in which the obtained value isrecorded in association with the converted value.
 6. A decryptingapparatus for decrypting encrypted data, the encrypted data being atleast one of encoded image data, audio data, and text data, saiddecrypting apparatus comprising: a file reading unit operable to obtaina file which has a data section including the encoded image data, audiodata, and text data and a header section including a header of the datasection; a header analyzing unit operable to analyze the header sectionof the file and to obtain a value described in a field that is includedin the header section to show an encoding method used for the encrypteddata and information regarding encryption; a header converting unitoperable to convert the obtained value according to a predeterminedconversion rule and to replace the value described in the field with theconverted value; a decrypting unit operable to decrypt the encrypteddata out of the encoded image data, audio data, and the text dataincluded in the data section of the file; and a file outputting unitoperable to output a file having a header section including a field inwhich the value has been replaced and a data section including thedecrypted data.
 7. The decrypting apparatus according to claim 6,wherein said header converting unit is operable to convert the obtainedvalue through a bit inversion.
 8. The decrypting apparatus according toclaim 7, wherein said header converting unit is operable to change a bitposition in the obtained value at which the bit inversion is to beperformed, according to the information regarding the encryption.
 9. Thedecrypting apparatus according to claim 7, wherein said headerconverting unit is operable to change a bit inversion formula to be usedfor the bit inversion, according to the information regarding theencryption.
 10. The decrypting apparatus according to claim 6, whereinthe conversion rule is represented by a conversion table in which theobtained value is recorded in association with the converted value. 11.A data reproducing apparatus for decrypting and decoding encrypted datafor reproduction, the encrypted data being at least one of encoded imagedata, audio data, and text data, said data reproducing apparatuscomprising: a file reading unit operable to obtain a file which has adata section including the encoded image data, audio data, and text dataand a header section including a header of the data section; a headeranalyzing unit operable to analyze the header section of the file and toobtain a value described in a field that is included in the headersection to show an encoding method used for the encrypted data andinformation regarding encryption; a header converting unit operable toconvert the obtained value according to a predetermined conversion ruleand to replace the value described in the field with the convertedvalue; a decrypting unit operable to decrypt the encrypted data out ofthe encoded image data, audio data, and the text data included in thedata section of the file; and a decoding unit operable to determine theencoding method used for the data by reference to the field in which thevalue has been replaced and to decode the decrypted data.
 12. The datareproducing apparatus according to claim 11, wherein said headerconverting unit is operable to convert the obtained value through a bitinversion.
 13. The data reproducing apparatus according to claim 12,wherein said header converting unit is operable to change a bit positionin the obtained value at which the bit inversion is to be performed,according to the information regarding the encryption.
 14. The datareproducing apparatus according to claim 12, wherein said headerconverting unit is operable to change a bit inversion formula to be usedfor the bit inversion, according to the information regarding theencryption.
 15. The data reproducing apparatus according to claim 11,wherein the conversion rule is represented by a conversion table inwhich the obtained value is recorded in association with the convertedvalue.
 16. An encrypting method of encrypting at least one of encodedimage data, audio data, and text data, comprising: a file reading stepof obtaining a file which has a data section including the encoded imagedata, audio data, and text data and a header section including a headerof the data section; an encrypting step of encrypting at least one ofthe encoded image data, audio data, and text data included in the datasection of the file; a header analyzing step of analyzing the headersection of the file and obtaining a value described in a field that isincluded in the header section to show an encoding method used for datato be encrypted in said encrypting step; a header converting step ofconverting the obtained value according to a predetermined conversionrule and replacing the value described in the field with the convertedvalue; and a file outputting step of outputting a file having a headersection including a field in which the value has been replaced and adata section including the encrypted data.
 17. A decrypting method ofdecrypting encrypted data, the encrypted data being at least one ofencoded image data, audio data, and text data, said decrypting methodcomprising: a file reading step of obtaining a file which has a datasection including the encoded image data, audio data, and text data anda header section including a header of the data section; a headeranalyzing step of analyzing the header section of the file and obtaininga value described in a field that is included in the header section toshow an encoding method used for the encrypted data and informationregarding encryption; a header converting step of converting theobtained value according to a predetermined conversion rule andreplacing the value described in the field with the converted value; adecrypting step of decrypting the encrypted data out of the encodedimage data, audio data, and the text data included in the data sectionof the file; and a file outputting step of outputting a file having aheader section including a field in which the value has been replacedand a data section including the decrypted data.
 18. A data reproducingmethod of decrypting and decoding encrypted data for reproduction, theencrypted data being at least one of encoded image data, audio data, andtext data, said data reproducing method comprising: a file reading stepof obtaining a file which has a data section including the encoded imagedata, audio data, and text data and a header section including a headerof the data section; a header analyzing step of analyzing the headersection of the file and obtaining a value described in a field that isincluded in the header section to show an encoding method used for theencrypted data and information regarding encryption; a header convertingstep of converting the obtained value according to a predeterminedconversion rule and replacing the value described in the field with theconverted value; a decrypting step of decrypting the encrypted data outof the encoded image data, audio data, and the text data included in thedata section of the file; and a decoding step of determining theencoding method used for the data by reference to the field in which thevalue has been replaced and decoding the decrypted data.
 19. A programfor an encrypting apparatus which encrypts at least one of encoded imagedata, audio data, and text data, said program causing a computer toexecute: a file reading step of obtaining a file which has a datasection including the encoded image data, audio data, and text data anda header section including a header of the data section; an encryptingstep of encrypting at least one of the encoded image data, audio data,and text data included in the data section of the file; a headeranalyzing step of analyzing the header section of the file and obtaininga value described in a field that is included in the header section toshow an encoding method used for data to be encrypted in said encryptingstep; a header converting step of converting the obtained valueaccording to a predetermined conversion rule and replacing the valuedescribed in the field with the converted value; and a file outputtingstep of outputting a file having a header section including a field inwhich the value has been replaced and a data section including theencrypted data.
 20. A program for a decrypting apparatus which decryptsencrypted data, the encrypted data being at least one of encoded imagedata, audio data, and text data, said program causing a computer toexecute: a file reading step of obtaining a file which has a datasection including the encoded image data, audio data, and text data anda header section including a header of the data section; a headeranalyzing step of analyzing the header section of the file and obtaininga value described in a field that is included in the header section toshow an encoding method used for the encrypted data and informationregarding encryption; a header converting step of converting theobtained value according to a predetermined conversion rule andreplacing the value described in the field with the converted value; adecrypting step of decrypting the encrypted data out of the encodedimage data, audio data, and the text data included in the data sectionof the file; and a file outputting step of outputting a file having aheader section including a field in which the value has been replacedand a data section including the decrypted data.
 21. A program for adata reproducing apparatus which decrypts and decodes encrypted data forreproduction, the encrypted data being at least one of encoded imagedata, audio data, and text data, said program causing a computer toexecute: a file reading step of obtaining a file which has a datasection including the encoded image data, audio data, and text data anda header section including a header of the data section; a headeranalyzing step of analyzing the header section of the file and obtaininga value described in a field that is included in the header section toshow an encoding method used for the encrypted data and informationregarding encryption; a header converting step of converting theobtained value according to a predetermined conversion rule andreplacing the value described in the field with the converted value; adecrypting step of decrypting the encrypted data out of the encodedimage data, audio data, and the text data included in the data sectionof the file; and a decoding step of determining the encoding method usedfor the data by reference to the field in which the value has beenreplaced and decoding the decrypted data.
 22. A computer-readablerecording medium on which a file is recorded, said file including: adata section which includes encrypted data, the encrypted data being atleast one of encoded image data, audio data, and text data; and a headersection which includes a header of the data section, wherein the headersection includes a field showing an encoding method used for theencrypted data and information regarding encryption.